<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>编辑书本信息</title>
	<link rel="stylesheet" type="text/css" href="/css/mygoodsshelf.css">
    <link rel="stylesheet" type="text/css" href="/css/upload.css">
</head>	
</head>
<body>
		<!-- 导航条 -->
        <nav class="navbar">
            <div class="nav-menu">
                <ul class="menu">
                    <li><a href="main.html">首页</a></li>
                    <li><a href="goods.html">二手商品</a></li>
                    <li><a href="request.html">求购区</a></li>
                </ul>					
            </div><!-- nav-menu -->
    
            <form class="nav-search">
                <input type="search" class="searchIn" placeholder="搜二手商品...">
                <button class="search-logo"><img src="/image/search.png"></button>
            </form>
    
            <div class="nav-info">
                <a href="infomation.html" class="username">徐荪睿</a>
                <a href="cart.html" class="goodsshelf">||&nbsp;&nbsp;&nbsp;我的购物车</a>
                <a href="/register.html" class="logout">[ 退 出 ]</a>
            </div> <!-- nav-info-end -->
        </nav>

	<div class="titleName">
		<h3>编辑二手商品信息</h3>
	</div>

	<div class="container">
		<form action="infomation.html">
			<p>
				<span class="pic-icon">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
				商&nbsp;品&nbsp;&nbsp;图&nbsp;片： <input type="file" name="goods-pic" id="goods-file">
				<img id="goods-pic" src="/image/ran3.jpg">
			</p>
			<p>
				<span class="name-icon">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
				商&nbsp;品&nbsp;&nbsp;名&nbsp;称：<input type="text" name="goods-name">				
			</p>
			<p>
				<span class="number-icon">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
				商&nbsp;品&nbsp;&nbsp;数&nbsp;量：<input type="text" name="goods-number">
			</p>
			<p>
				<span class="orign-icon">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
				商&nbsp;品&nbsp;&nbsp;原&nbsp;价：<input type="text" name="goods-orign">	
			</p>
			<p>
				<span class="price-icon">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
				商&nbsp;品&nbsp;&nbsp;售&nbsp;价：<input type="text" name="goods-price">	
			</p>			
			<p>
				<span class="desc-icon">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
				商&nbsp;品&nbsp;&nbsp;描&nbsp;述：<input type="text" name="goods-desc">
			</p>
			<input type="submit" class="submit-btn" name="goods-submit">															
		</form>
	</div>
	<footer>
		<a href="#">©2021-7 二手物品交易</a>
		<a href="#">意见反馈&nbsp;&nbsp;&nbsp;联系我们&nbsp;&nbsp;&nbsp;隐私权声明&nbsp;&nbsp;&nbsp;使用条款</a>
	</footer>
	<script type="text/javascript" src="/js/jquery-3.2.js"></script>
	<script type="text/javascript">
		$(function(){
			$("#goods-file").change(function(){
				var filePath = $(this).val().split("\\");
				var len = filePath.length;
				var file = filePath[len-1];
				if (!file) {
					filePath = "image/loadPic.png"
				}
				filePath = "image/"+file;
				// console.log(filePath);
				$("#goods-pic").attr("src",filePath);

			})
		});
	</script>
</body>
</html>